<?php
		global $wpdb;
		$date = $date = date('Y-m-d H:s:i');
		$customer = array(
 			'customerName'			=> stripslashes($_POST['Name']),
 			'customerEmail'			=> stripslashes($_POST['Email']),
 			'customerAddress'		=> stripslashes($_POST['Address']),
 			'customerPhone'			=> stripslashes($_POST['Tel']),
 			'customerFax'			=> ' ',
 			'customerComment'		=> stripslashes($_POST['Message']),
			'guestParent'			=> 0,
 			'date'					=> $date	
 			);
 		$customerID = db_insert_data("customers",$customer,$date);
 		//print_r($_POST);
 			$transport		= stripslashes($_POST['transport_ticket']);
 			$goway			= stripslashes($_POST['returnoneway']);
			$gofrom			= stripslashes($_POST['from_ticket']);
			$goto			= stripslashes($_POST['to_ticket']);
			$checkIn		= $_POST['check_in_yr_ticket'].'-'.$_POST['check_in_mo_ticket'].'-'.$_POST['check_in_dy_ticket'].' 00:00:00';
			$timeIn			= $_POST['time_in_ticket'];
			$checkOut		= $_POST['check_out_yr_ticket'].'-'.$_POST['check_out_mo_ticket'].'-'.$_POST['check_out_dy_ticket'].' 00:00:00';
			$timeOut		= $_POST['time_out_ticket'];
			$adults			= stripslashes($_POST['adults_ticket']);
			$childrent		= stripslashes($_POST['children_ticket']);
			$infant			= stripslashes($_POST['infant_ticket']);
			$onday			= stripslashes($_POST['radio_ticket']);
			$status			= 'Pending';
			$paymentID		= '';			
 		
 		$tickets = array(
 			'transport'		=> $transport,
			'goway'			=> $goway,
			'gofrom'		=> $gofrom,
			'goto'			=> $goto,
			'checkIn'		=> $checkIn,
 			'timeIn'		=> $timeIn,
			'checkOut'		=> $checkOut,
 			'timeOut'		=> $timeOut,
			'adults'		=> $adults,
			'childrent'		=> $childrent,
			'infant'		=> $infant,
			'onday'			=> $onday,
			'status'		=> $status,
			'paymentID'		=> $paymentID,
			'customerID'	=> $customerID,
 			'state'			=> 0,
			'date'			=> $date
 		);
 		$ticketID = db_insert_data("tickets",$tickets,$date);
		$_SESSION['ma_xac_nhan']=null;

?>

